From: htrex Date: Wed, 29 Jul 2026 09:51:52 +0000 (+0200) Subject: search: Do not unregister a provider that was not registered X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~9^2^2~1 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8f80992b9bcade686069b6be6aa0d9b61def8131;p=gnome-shell.git search: Do not unregister a provider that was not registered If the passed provider is not in this._providers, indexOf() returns -1 and splice(-1, 1) silently removes the LAST provider in the array - an arbitrary, unrelated provider. Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/work_items/9317 Part-of: (cherry picked from commit a4c7d5e60e4f0982f7dfa048b7400eb4fdf2f97e) --- diff --git a/js/ui/search.js b/js/ui/search.js index 9ded14184..88965bfb6 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -670,6 +670,9 @@ export const SearchResultsView = GObject.registerClass({ _unregisterProvider(provider) { const index = this._providers.indexOf(provider); + if (index < 0) + return; + this._providers.splice(index, 1); if (provider.display)